Skip to content

Conversation

@Superhepper
Copy link
Collaborator

No description provided.

wiktor-k
wiktor-k previously approved these changes Nov 20, 2025
Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks 👌

wiktor-k
wiktor-k previously approved these changes Nov 21, 2025
ionut-arm
ionut-arm previously approved these changes Dec 4, 2025
Copy link
Member

@ionut-arm ionut-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks, couple of minor tweaks ⬇️

@Superhepper Superhepper dismissed stale reviews from ionut-arm and wiktor-k via 391eb90 December 4, 2025 18:07
@Superhepper Superhepper force-pushed the Doc-Asymmetric-Primitives branch 2 times, most recently from 391eb90 to 44e9562 Compare December 4, 2025 18:10
ionut-arm
ionut-arm previously approved these changes Dec 5, 2025
wiktor-k
wiktor-k previously approved these changes Dec 8, 2025
Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good but I've left a couple of small nitpicks 😅

//! # Code examples
//! The code examples are just small snippets of all the different steps that are necessary
//! in order to get the examples to actually work so it is recommended to check all the steps
//! in comments in the source code, or in the documented examples in our repo.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I don't really know what this comment is trying to say, that the code examples are just rudimentary? Or that the commented-out sections may also be important? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is trying to say that the code examples in documentation are usually only showing a small part of all the necessary steps needed in order to make things actually work.

And that thing shown is mostly focused around context method call or other points of interest,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is trying to say that the code examples in documentation are usually only showing a small part of all the necessary steps needed in order to make things actually work.

And that thing shown is mostly focused around context method call or other points of interest,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to rephrase it to make that point clear.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better?

@Superhepper Superhepper dismissed stale reviews from wiktor-k and ionut-arm via c0a158f December 8, 2025 18:15
@Superhepper Superhepper force-pushed the Doc-Asymmetric-Primitives branch from 44e9562 to c0a158f Compare December 8, 2025 18:15
Signed-off-by: Jesper Brynolf <jesper.brynolf@gmail.com>
@Superhepper Superhepper force-pushed the Doc-Asymmetric-Primitives branch from c0a158f to feafd12 Compare December 8, 2025 20:55
/// * `cipher_text` - The cipher text to be decrypted.
/// * `in_scheme` - The padding scheme to use if scheme associated with
/// the `key_handle` is [RsaDecryptionScheme::Null].
/// * `label` - A label whose association with the message is to be verified.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the label have to match the label used during encrypt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TCG TPM 2.0 Specification, Revision 01.59, Part 3 - Commands, Section 14.3 - TPM2_RSA_Decrypt

If a label is used in the padding process of the scheme during encryption, the label parameter is required
to be present in the decryption process and label is required to be the same in both cases. If label is not
the same, the decrypt operation is very likely to fail ((TPM_RC_VALUE). If label is present (label.size !=
0), it shall be a byte stream whose last byte is zero or the TPM will return TPM_RC_VALUE.
NOTE 1 The size of label includes the terminating null.

I also noticed another thing that the label is optional. So I will have to adress that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants